<?php /* CALENDAR $Id: vw_day_tasks.php,v 1.6 2004/10/21 22:47:07 jcgonz Exp $ */
global $this_day, $first_time, $last_time, $company_id, $m, $a;

$links = array();
// assemble the links for the tasks
require_once( DP_CURRENT_MODULE_PATH.'/links_tasks.php' );
getTaskLinks( $first_time, $last_time, $links, 100, $company_id );

$s = '';
$dayStamp = $this_day->format( FMT_TIMESTAMP_DATE );
?>
<table cellspacing="0" cellpadding="3" border="0" width="100%" class="infopanel">
<tr style="background-color: white">
	<td>
		<table cellspacing="0" cellpadding="2" border="0" width="100%">
		<?
		if (isset( $links[$dayStamp] )) {
			foreach ($links[$dayStamp] as $e) {
				$href = isset($e['href']) ? $e['href'] : null;
				$alt = isset($e['alt']) ? $e['alt'] : null;

				$s .= '<tr><td class="internal"><img src="images/'.
					($e['percent'] == '100' ? 'task_complete.gif' : 'task_today.gif').'">&nbsp;';
				$s .= $href ? '<a href="'.$href.'" title="'.$alt.'">' : '';
				$s .= "{$e['text']}";
				$s .= $href ? '</a>' : '';
				$s .= '</td></tr>';
			}
		}
		echo $s;
		?>
		</table>
	</td>
</tr>
</table>
<?
	$min_view = 1;
	include DP_MODULE_PATH.'/tasks/todo.php';
?>
